package org.springframework.boot.autoconfigure;

import org.springframework.boot.autoconfigure.config.ClockConfig;
import org.springframework.boot.autoconfigure.core.BusinessKeyProvider;
import org.springframework.boot.autoconfigure.core.ClockAspectHandler;
import org.springframework.boot.autoconfigure.core.LockInfoProvider;
import org.springframework.boot.autoconfigure.lock.LockFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * Created by kl on 2017/12/29.
 * Content :适用于内部低版本spring mvc项目配置,redisson外化配置
 */
@Configuration
@Import({ClockAspectHandler.class})
public class ToolsConfiguration {
    @Bean
    public LockInfoProvider lockInfoProvider(){
        return new LockInfoProvider();
    }

    @Bean
    public BusinessKeyProvider businessKeyProvider(){
        return new BusinessKeyProvider();
    }

    @Bean
    public LockFactory lockFactory(){
        return new LockFactory();
    }
    @Bean
    public ClockConfig klockConfig(){
        return new ClockConfig();
    }
}
